package com.sunny.design.decorator.simple;

/**
 * 在不使用设计模式时，想要扩展一个类的功能，就要一个一个的继承下去，若需要添加的功能较多，那类继承结构也会更高
 *
 * @author Sunny
 * @date 2020/1/12 下午4:07
 */
public class BatterCakeTest {

    public static void main(String[] args) {
        BatterCake cake = new BatterCake();
        System.out.println(cake.getMsg() + ", 总价：" + cake.getPrice());

        cake = new BatterCakeWithEgg();
        System.out.println(cake.getMsg() + ", 总价：" + cake.getPrice());

        cake = new BatterCakeWithHotDog();
        System.out.println(cake.getMsg() + ", 总价：" + cake.getPrice());

    }
}
